import socket
buffsize=1024
ip_port=('192.168.1.107',9997)
server=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)#ipv4 udp协议
server.bind(ip_port)
while True:
    data,client=server.recvfrom(buffsize)
    print('接收到数据：',data)
    server.sendto(data.upper(),client)
server.close()
